<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://lib.sinaapp.com/js/jquery/2.0.2/jquery-2.0.2.min.js"></script>
    <title>展示</title>
</head>
<body>
<!--上方-->
<div class="nav" style="height:100px;"></div>
<!--主体-->
<div class="container-fluid main">
    <!--    左边-->
    <div class="col-sm-3"></div>
    <!--    中间-->
    <div class="col-sm-6">
        <?php
        $mysqli = new mysqli('127.0.0.1', 'root', '123456','index');

        if ($mysqli->connect_error) {
        die('Connect Error (' . $mysqli->connect_errno . ') '
        . $mysqli->connect_error);
        }
        $query="select name,photo,user from photo ";
        $result=mysqli_query($mysqli,$query);
        if(mysqli_num_rows($result)>0) {
        while($row=mysqli_fetch_assoc($result)) {

        ?>
        <div class="subcontent">
            <div class="subcon_photo" align="center">
                <img  width="100" height="200" src="data:image/jpg;base64,<?= base64_encode($row['photo']) ?>">
            </div>
        </div>
        <?php
            }
        }
        ?>
    </div>
    <!--    右边-->
    <div class="col-sm-3"></div>

</div>
</div>

</body>
</html>
